3.872 \(\int \sec ^2(c+d x) (a+a \sin (c+d x))^3 \tan ^3(c+d x) \, dx\)

Optimal. Leaf size=78 \[ \frac {a^5}{2 d (a-a \sin (c+d x))^2}-\frac {3 a^4}{d (a-a \sin (c+d x))}-\frac {a^3 \sin (c+d x)}{d}-\frac {3 a^3 \log (1-\sin (c+d x))}{d} \]

[Out]

-3*a^3*ln(1-sin(d*x+c))/d-a^3*sin(d*x+c)/d+1/2*a^5/d/(a-a*sin(d*x+c))^2-3*a^4/d/(a-a*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2836, 12, 43} \[ \frac {a^5}{2 d (a-a \sin (c+d x))^2}-\frac {3 a^4}{d (a-a \sin (c+d x))}-\frac {a^3 \sin (c+d x)}{d}-\frac {3 a^3 \log (1-\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^2*(a + a*Sin[c + d*x])^3*Tan[c + d*x]^3,x]

[Out]

(-3*a^3*Log[1 - Sin[c + d*x]])/d - (a^3*Sin[c + d*x])/d + a^5/(2*d*(a - a*Sin[c + d*x])^2) - (3*a^4)/(d*(a - a
*Sin[c + d*x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2836

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d*x)/b
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps

\begin {align*} \int \sec ^2(c+d x) (a+a \sin (c+d x))^3 \tan ^3(c+d x) \, dx &=\frac {a^5 \operatorname {Subst}\left (\int \frac {x^3}{a^3 (a-x)^3} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \frac {x^3}{(a-x)^3} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \left (-1+\frac {a^3}{(a-x)^3}-\frac {3 a^2}{(a-x)^2}+\frac {3 a}{a-x}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {3 a^3 \log (1-\sin (c+d x))}{d}-\frac {a^3 \sin (c+d x)}{d}+\frac {a^5}{2 d (a-a \sin (c+d x))^2}-\frac {3 a^4}{d (a-a \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.23, size = 53, normalized size = 0.68 \[ -\frac {a^3 \left (2 \sin (c+d x)+\frac {5-6 \sin (c+d x)}{(\sin (c+d x)-1)^2}+6 \log (1-\sin (c+d x))\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^2*(a + a*Sin[c + d*x])^3*Tan[c + d*x]^3,x]

[Out]

-1/2*(a^3*(6*Log[1 - Sin[c + d*x]] + (5 - 6*Sin[c + d*x])/(-1 + Sin[c + d*x])^2 + 2*Sin[c + d*x]))/d

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 110, normalized size = 1.41 \[ \frac {4 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3} - 6 \, {\left (a^{3} \cos \left (d x + c\right )^{2} + 2 \, a^{3} \sin \left (d x + c\right ) - 2 \, a^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (a^{3} \cos \left (d x + c\right )^{2} + a^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (d \cos \left (d x + c\right )^{2} + 2 \, d \sin \left (d x + c\right ) - 2 \, d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/2*(4*a^3*cos(d*x + c)^2 + a^3 - 6*(a^3*cos(d*x + c)^2 + 2*a^3*sin(d*x + c) - 2*a^3)*log(-sin(d*x + c) + 1) -
 2*(a^3*cos(d*x + c)^2 + a^3)*sin(d*x + c))/(d*cos(d*x + c)^2 + 2*d*sin(d*x + c) - 2*d)

________________________________________________________________________________________

giac [B]  time = 0.27, size = 178, normalized size = 2.28 \[ \frac {6 \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 12 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{3}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + \frac {25 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 108 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 170 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 108 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 25 \, a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{4}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

1/2*(6*a^3*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 12*a^3*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(3*a^3*tan(1/2*d*x
+ 1/2*c)^2 + 2*a^3*tan(1/2*d*x + 1/2*c) + 3*a^3)/(tan(1/2*d*x + 1/2*c)^2 + 1) + (25*a^3*tan(1/2*d*x + 1/2*c)^4
 - 108*a^3*tan(1/2*d*x + 1/2*c)^3 + 170*a^3*tan(1/2*d*x + 1/2*c)^2 - 108*a^3*tan(1/2*d*x + 1/2*c) + 25*a^3)/(t
an(1/2*d*x + 1/2*c) - 1)^4)/d

________________________________________________________________________________________

maple [B]  time = 0.32, size = 237, normalized size = 3.04 \[ \frac {a^{3} \left (\sin ^{7}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {3 a^{3} \left (\sin ^{7}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}-\frac {3 a^{3} \left (\sin ^{5}\left (d x +c \right )\right )}{8 d}-\frac {a^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{d}-\frac {3 a^{3} \sin \left (d x +c \right )}{d}+\frac {3 a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {3 a^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{4 d}-\frac {3 a^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {3 a^{3} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {3 a^{3} \left (\sin ^{5}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {3 a^{3} \left (\sin ^{5}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}+\frac {a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c))^3,x)

[Out]

1/4/d*a^3*sin(d*x+c)^7/cos(d*x+c)^4-3/8/d*a^3*sin(d*x+c)^7/cos(d*x+c)^2-3/8*a^3*sin(d*x+c)^5/d-a^3*sin(d*x+c)^
3/d-3*a^3*sin(d*x+c)/d+3/d*a^3*ln(sec(d*x+c)+tan(d*x+c))+3/4/d*a^3*tan(d*x+c)^4-3/2/d*a^3*tan(d*x+c)^2-3/d*a^3
*ln(cos(d*x+c))+3/4/d*a^3*sin(d*x+c)^5/cos(d*x+c)^4-3/8/d*a^3*sin(d*x+c)^5/cos(d*x+c)^2+1/4/d*a^3*sin(d*x+c)^4
/cos(d*x+c)^4

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 70, normalized size = 0.90 \[ -\frac {6 \, a^{3} \log \left (\sin \left (d x + c\right ) - 1\right ) + 2 \, a^{3} \sin \left (d x + c\right ) - \frac {6 \, a^{3} \sin \left (d x + c\right ) - 5 \, a^{3}}{\sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/2*(6*a^3*log(sin(d*x + c) - 1) + 2*a^3*sin(d*x + c) - (6*a^3*sin(d*x + c) - 5*a^3)/(sin(d*x + c)^2 - 2*sin(
d*x + c) + 1))/d

________________________________________________________________________________________

mupad [B]  time = 10.13, size = 205, normalized size = 2.63 \[ \frac {3\,a^3\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {6\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}{d}-\frac {6\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-18\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+20\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-18\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+6\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(c + d*x)^3*(a + a*sin(c + d*x))^3)/cos(c + d*x)^5,x)

[Out]

(3*a^3*log(tan(c/2 + (d*x)/2)^2 + 1))/d - (6*a^3*log(tan(c/2 + (d*x)/2) - 1))/d - (20*a^3*tan(c/2 + (d*x)/2)^3
 - 18*a^3*tan(c/2 + (d*x)/2)^2 - 18*a^3*tan(c/2 + (d*x)/2)^4 + 6*a^3*tan(c/2 + (d*x)/2)^5 + 6*a^3*tan(c/2 + (d
*x)/2))/(d*(7*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2) - 8*tan(c/2 + (d*x)/2)^3 + 7*tan(c/2 + (d*x)/2)^4 -
4*tan(c/2 + (d*x)/2)^5 + tan(c/2 + (d*x)/2)^6 + 1))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)**3*(a+a*sin(d*x+c))**3,x)

[Out]

Timed out

________________________________________________________________________________________